Optimal. Leaf size=337 \[ \frac {(e+f x)^3}{3 b f}-\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}+\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}-\frac {2 a f (e+f x) \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^2}+\frac {2 a f (e+f x) \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^2}+\frac {2 a f^2 \text {PolyLog}\left (3,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^3}-\frac {2 a f^2 \text {PolyLog}\left (3,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.49, antiderivative size = 337, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {5676, 32,
3403, 2296, 2221, 2611, 2320, 6724} \begin {gather*} \frac {2 a f^2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d^3 \sqrt {a^2+b^2}}-\frac {2 a f^2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d^3 \sqrt {a^2+b^2}}-\frac {2 a f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d^2 \sqrt {a^2+b^2}}+\frac {2 a f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d^2 \sqrt {a^2+b^2}}-\frac {a (e+f x)^2 \log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}+1\right )}{b d \sqrt {a^2+b^2}}+\frac {a (e+f x)^2 \log \left (\frac {b e^{c+d x}}{\sqrt {a^2+b^2}+a}+1\right )}{b d \sqrt {a^2+b^2}}+\frac {(e+f x)^3}{3 b f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 2221
Rule 2296
Rule 2320
Rule 2611
Rule 3403
Rule 5676
Rule 6724
Rubi steps
\begin {align*} \int \frac {(e+f x)^2 \sinh (c+d x)}{a+b \sinh (c+d x)} \, dx &=\frac {\int (e+f x)^2 \, dx}{b}-\frac {a \int \frac {(e+f x)^2}{a+b \sinh (c+d x)} \, dx}{b}\\ &=\frac {(e+f x)^3}{3 b f}-\frac {(2 a) \int \frac {e^{c+d x} (e+f x)^2}{-b+2 a e^{c+d x}+b e^{2 (c+d x)}} \, dx}{b}\\ &=\frac {(e+f x)^3}{3 b f}-\frac {(2 a) \int \frac {e^{c+d x} (e+f x)^2}{2 a-2 \sqrt {a^2+b^2}+2 b e^{c+d x}} \, dx}{\sqrt {a^2+b^2}}+\frac {(2 a) \int \frac {e^{c+d x} (e+f x)^2}{2 a+2 \sqrt {a^2+b^2}+2 b e^{c+d x}} \, dx}{\sqrt {a^2+b^2}}\\ &=\frac {(e+f x)^3}{3 b f}-\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}+\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}+\frac {(2 a f) \int (e+f x) \log \left (1+\frac {2 b e^{c+d x}}{2 a-2 \sqrt {a^2+b^2}}\right ) \, dx}{b \sqrt {a^2+b^2} d}-\frac {(2 a f) \int (e+f x) \log \left (1+\frac {2 b e^{c+d x}}{2 a+2 \sqrt {a^2+b^2}}\right ) \, dx}{b \sqrt {a^2+b^2} d}\\ &=\frac {(e+f x)^3}{3 b f}-\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}+\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}-\frac {2 a f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^2}+\frac {2 a f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^2}+\frac {\left (2 a f^2\right ) \int \text {Li}_2\left (-\frac {2 b e^{c+d x}}{2 a-2 \sqrt {a^2+b^2}}\right ) \, dx}{b \sqrt {a^2+b^2} d^2}-\frac {\left (2 a f^2\right ) \int \text {Li}_2\left (-\frac {2 b e^{c+d x}}{2 a+2 \sqrt {a^2+b^2}}\right ) \, dx}{b \sqrt {a^2+b^2} d^2}\\ &=\frac {(e+f x)^3}{3 b f}-\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}+\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}-\frac {2 a f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^2}+\frac {2 a f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^2}+\frac {\left (2 a f^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (\frac {b x}{-a+\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{b \sqrt {a^2+b^2} d^3}-\frac {\left (2 a f^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {b x}{a+\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{b \sqrt {a^2+b^2} d^3}\\ &=\frac {(e+f x)^3}{3 b f}-\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}+\frac {a (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}-\frac {2 a f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^2}+\frac {2 a f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^2}+\frac {2 a f^2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^3}-\frac {2 a f^2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.04, size = 610, normalized size = 1.81 \begin {gather*} \frac {x \left (3 e^2+3 e f x+f^2 x^2\right )}{3 b}+\frac {a \left (2 d^2 e^2 \sqrt {\left (a^2+b^2\right ) e^{2 c}} \tanh ^{-1}\left (\frac {a+b e^{c+d x}}{\sqrt {a^2+b^2}}\right )-2 \sqrt {a^2+b^2} d^2 e e^c f x \log \left (1+\frac {b e^{2 c+d x}}{a e^c-\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )-\sqrt {a^2+b^2} d^2 e^c f^2 x^2 \log \left (1+\frac {b e^{2 c+d x}}{a e^c-\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+2 \sqrt {a^2+b^2} d^2 e e^c f x \log \left (1+\frac {b e^{2 c+d x}}{a e^c+\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+\sqrt {a^2+b^2} d^2 e^c f^2 x^2 \log \left (1+\frac {b e^{2 c+d x}}{a e^c+\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )-2 \sqrt {a^2+b^2} d e^c f (e+f x) \text {PolyLog}\left (2,-\frac {b e^{2 c+d x}}{a e^c-\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+2 \sqrt {a^2+b^2} d e^c f (e+f x) \text {PolyLog}\left (2,-\frac {b e^{2 c+d x}}{a e^c+\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+2 \sqrt {a^2+b^2} e^c f^2 \text {PolyLog}\left (3,-\frac {b e^{2 c+d x}}{a e^c-\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )-2 \sqrt {a^2+b^2} e^c f^2 \text {PolyLog}\left (3,-\frac {b e^{2 c+d x}}{a e^c+\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )\right )}{b \sqrt {a^2+b^2} d^3 \sqrt {\left (a^2+b^2\right ) e^{2 c}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.47, size = 0, normalized size = 0.00 \[\int \frac {\left (f x +e \right )^{2} \sinh \left (d x +c \right )}{a +b \sinh \left (d x +c \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 956 vs.
\(2 (308) = 616\).
time = 0.36, size = 956, normalized size = 2.84 \begin {gather*} \frac {{\left (a^{2} + b^{2}\right )} d^{3} f^{2} x^{3} + 3 \, {\left (a^{2} + b^{2}\right )} d^{3} f x^{2} \cosh \left (1\right ) + 3 \, {\left (a^{2} + b^{2}\right )} d^{3} x \cosh \left (1\right )^{2} + 3 \, {\left (a^{2} + b^{2}\right )} d^{3} x \sinh \left (1\right )^{2} + 6 \, a b f^{2} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} {\rm polylog}\left (3, \frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}}}{b}\right ) - 6 \, a b f^{2} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} {\rm polylog}\left (3, \frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}}}{b}\right ) - 6 \, {\left (a b d f^{2} x + a b d f \cosh \left (1\right ) + a b d f \sinh \left (1\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) + 6 \, {\left (a b d f^{2} x + a b d f \cosh \left (1\right ) + a b d f \sinh \left (1\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) + 3 \, {\left (a b c^{2} f^{2} - 2 \, a b c d f \cosh \left (1\right ) + a b d^{2} \cosh \left (1\right )^{2} + a b d^{2} \sinh \left (1\right )^{2} - 2 \, {\left (a b c d f - a b d^{2} \cosh \left (1\right )\right )} \sinh \left (1\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) + 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) - 3 \, {\left (a b c^{2} f^{2} - 2 \, a b c d f \cosh \left (1\right ) + a b d^{2} \cosh \left (1\right )^{2} + a b d^{2} \sinh \left (1\right )^{2} - 2 \, {\left (a b c d f - a b d^{2} \cosh \left (1\right )\right )} \sinh \left (1\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) - 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) - 3 \, {\left (a b d^{2} f^{2} x^{2} - a b c^{2} f^{2} + 2 \, {\left (a b d^{2} f x + a b c d f\right )} \cosh \left (1\right ) + 2 \, {\left (a b d^{2} f x + a b c d f\right )} \sinh \left (1\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) + 3 \, {\left (a b d^{2} f^{2} x^{2} - a b c^{2} f^{2} + 2 \, {\left (a b d^{2} f x + a b c d f\right )} \cosh \left (1\right ) + 2 \, {\left (a b d^{2} f x + a b c d f\right )} \sinh \left (1\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) + 3 \, {\left ({\left (a^{2} + b^{2}\right )} d^{3} f x^{2} + 2 \, {\left (a^{2} + b^{2}\right )} d^{3} x \cosh \left (1\right )\right )} \sinh \left (1\right )}{3 \, {\left (a^{2} b + b^{3}\right )} d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (e + f x\right )^{2} \sinh {\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\mathrm {sinh}\left (c+d\,x\right )\,{\left (e+f\,x\right )}^2}{a+b\,\mathrm {sinh}\left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________